<!doctype html>
<html>
<head>
	<meta charset="UTF-8">
	<script type="text/javascript" src="__STATIC__/jquery-1.8.2.js"></script>
	<link href="/M/Public/static/kindeditor/default/default.css" rel="stylesheet">
	<script src="/M/Public/static/kindeditor/kindeditor-min.js" charset="utf-8"></script>
	<script src="/M/Public/static/kindeditor/zh_CN.js" charset="utf-8"></script>
	<style>
	html,body{height:100%;overflow:hidden;}
	.btn {
    background-color: #F5F5F5;
    background-image: linear-gradient(to bottom, #FFFFFF, #E6E6E6);
    background-repeat: repeat-x;
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) #B3B3B3;
    border-image: none;
    border-radius: 4px 4px 4px 4px;
    border-style: solid;
    border-width: 1px;
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.2) inset, 0 1px 2px rgba(0, 0, 0, 0.05);
    color: #333333;
    cursor: pointer;
    display: inline-block;
    font-size: 14px;
    line-height: 20px;
    margin-bottom: 0;
    padding: 4px 12px;
    text-align: center;
    text-shadow: 0 1px 1px rgba(255, 255, 255, 0.75);
    vertical-align: middle;
}
.btn-primary {
    background-color: #006DCC;
    background-image: linear-gradient(to bottom, #0088CC, #0044CC);
    background-repeat: repeat-x;
    border-color: rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.1) rgba(0, 0, 0, 0.25);
    color: #FFFFFF;
    text-shadow: 0 -1px 0 rgba(0, 0, 0, 0.25);
}
.input-prepend {
    display: inline-block;
    font-size: 0;
    margin-bottom: 10px;
    vertical-align: middle;
    white-space: nowrap;
	width:90%;
}
.input-prepend .btn:first-child {
    border-radius: 4px 0 0 4px;
}
.input-prepend .btn {
    margin-right: -1px;
}
.input-prepend .add-on {
    background-color: #EEEEEE;
    border: 1px solid #CCCCCC;
    display: inline-block;
    font-size: 14px;
    font-weight: normal;
    height: 20px;
    line-height: 20px;
    min-width: 16px;
    padding: 4px 5px;
    text-align: center;
    text-shadow: 0 1px 0 #FFFFFF;
    width: auto;
}
input {
    background-color: #FFFFFF;
    border: 1px solid #CCCCCC;
    box-shadow: 0 1px 1px rgba(0, 0, 0, 0.075) inset;
    transition: border 0.2s linear 0s, box-shadow 0.2s linear 0s;
	width:100%;
	overflow:hidden;
}
input {
    border-radius: 4px 4px 4px 4px;
    color: #555555;
    display: inline-block;
    font-size: 14px;
    height: 20px;
    line-height: 20px;
    margin-bottom: 10px;
    padding: 4px 6px;
    vertical-align: middle;
}
	</style>
</head>
<body>
<div class="control-group" style="height:100%;">
	<form action="{:U('save')}" method="post" style="height:100%;">
		<div class="input-prepend">
			<span class="add-on">标题</span>
			<input class="span2" id="prependedInput" type="text" placeholder="标题">
		</div>
		<textarea name="content" style="height:40%;" class="span9"> </textarea>
		<div> 
			<button class="btn btn-primary">发表回复</button>
		</div>
	</form>
</div>
<script type="text/javascript">
	var editor;
	KindEditor.ready(function(K) {
	editor = K.create('textarea[name="content"]', {
	allowFileManager : false,
	themesPath: K.basePath,
	width: '100%',
	height: '400px',
	resizeType: 1,
	pasteType : 2,
	urlType : 'absolute',
	fileManagerJson : '/M/index.php?s=/home/worklog/filemanagerjson.html',
	//uploadJson : '/M/index.php?s=/home/worklog/uploadjson.html' }
	uploadJson : '/M/index.php?s=/home/addons/execute/_addons/editor/_controller/upload/_action/ke_upimg.html'
	});
	});
	$(function(){
	$('textarea[name="content"]').closest('form').submit(function(){
	editor.sync();
	});
	})
</script>
</body>
</html>